package com.bwie.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.service.SysUserServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: SysUserController
 * @Description: TODO
 * @version: v1.８.0
 * @author: 汪菲阳
 * @date: 2025/11/10 10:07
 */
@CrossOrigin
@RestController
@RequestMapping("sysUser")
public class SysUserController {
    @Autowired
    private SysUserServcie sysUserServcie;

    /**
     * 根据用户名称查询用户信息
     * @param userName
     * @return
     */
    @GetMapping("selectUserByUserName/{userName}")
    public Result<User> selectUserByUserName(@PathVariable("userName") String userName){
        return Result.success(sysUserServcie.selectUserByUserName(userName));
    }
}
